﻿@model WebStore.Web.App.Models.Admin.EditProductModel
@using (Html.BeginForm("EditProduct", "Admin",new{id=Model.Id}, FormMethod.Post, new { enctype = "multipart/form-data" }))
{
    <table>
        <tr>
            <td>@Html.LabelFor(x => x.Name)</td>
            <td>@Html.EditorFor(x => x.Name)</td>
        </tr>
        <tr>
            <td>@Html.LabelFor(x => x.CategoryId)</td>
            <td>@Html.DropDownListFor(x => x.CategoryId, Model.Categories)</td>
        </tr>
        <tr>
            <td>@Html.LabelFor(x => x.Price)</td>
            <td>@Html.EditorFor(x => x.Price)</td>
        </tr>
        <tr>
            <td>@Html.LabelFor(x => x.Quantity)</td>
            <td>@Html.EditorFor(x => x.Quantity)</td>
        </tr>
        <tr>
            <td>@Html.LabelFor(x => x.Description)</td>
            <td>@Html.TextAreaFor(x => x.Description)</td>
        </tr>
        <tr>
            <td>
                @Html.LabelFor(x => x.Photo)
            </td>
            <td>
                <input type="file" name="Photo" value="Photo" id="Photo"/>
            </td>
        </tr>
        <tr>
            <td>
                <input type="submit" value="Submit" class="actionButtons" />
            </td>
        </tr>
    </table>
}